home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 15
/
Amiga Plus Leser CD 15.iso
/
Online
/
newscoaster
/
Rexx
/
before_sendPL.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2002-03-12
|
1KB
|
49 lines
/* AmigaPL to ISO-8859-2 conversion for NewsCoaster */
/* by Grzegorz Kraszewski (Krashan^BlaBla) <krashan@amiga.org.pl> */
/* $VER: NewsCoasterPL 1.0 (30.4.2000) BLABLA PRODUCT */
OPTIONS RESULTS
ADDRESS "NEWSCOASTER"
IF ~Show("L","rexxsupport.library") THEN CALL AddLib("rexxsupport.library", 0, -30)
iso88592 = "±æê³óñ¶¼¿¡ÆÊ£ÑÓ¦¬¯"
amigapl = "âêëîóïôúûÂÊËÎÓÏÔÚÛ"
folderpath = "NewsCoasterData:outgoing/"
lista = ShowDir(folderpath,"F",":")
DO WHILE lista ~= ""
PARSE VAR lista filename ":" lista
IF Left(Upper(filename),5) = "NEWS_" THEN
DO
filename = folderpath || filename
newname = filename || ".BB"
IF Open(file1,filename,"R") THEN
DO
IF Open(file2,newname,"W") THEN
DO
DO WHILE ~Eof(file1)
line = ReadLn(file1)
IF Left(Upper(line),14) = "CONTENT-TYPE: " THEN
DO
line = Overlay("iso-8859-2",line,Pos("iso-8859-1",line,15))
WriteLn(file2,line)
WriteLn(file2,"X-CharsetConverter: apl2iso for NewsCoaster by Krashan^BlaBla <krashan@amiga.org.pl>")
END
ELSE
DO
line = Translate(line,iso88592,amigapl)
WriteLn(file2,line)
END
END
Close(file2)
END
Close(file1)
Delete(filename)
Rename(newname,filename)
END
END
END
EXIT